<div id="nav" style="background: white" class="navbar-fixed-top">
    <div id="nav-home">
        <ul class="nav nav-pills">
            <li role="presentation" class="active">
                <a href="/">
                    <span class="glyphicon glyphicon-home"></span>
                    首页
                </a>
            </li>
            <li role="presentation"><a href="/article"><span class="glyphicon glyphicon-file"></span> 文章 <span
                    class="badge">{{.artNum}}</span></a></li>
            {{if .isLogin}}
            <li role="presentation" class="pull-right">
                <div class="dropdown">
                    <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1"
                            data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="height: 40px">
                        <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
                        {{.username}}
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu1">
                        <li><a href="/aboutme"><span class="glyphicon glyphicon-heart"></span> 关于我</a></li>
                        <li role="separator" class="divider"></li>
                        <li role="presentation">
                            <a href='javascript:if(confirm("确定退出吗？")){location="/logout"}'><span
                                    class="glyphicon glyphicon-log-out"></span> 退出</a>
                        </li>
                    </ul>
                </div>
            </li>
            <li role="presentation" class="pull-right"><a href="/article/add"><span
                    class="glyphicon glyphicon-pencil"></span> 写文章</a></li>
            {{else}}
            <li role="presentation" class="pull-right"><a href="/register"><span
                    class="glyphicon glyphicon-new-window"></span> 管理者注册</a></li>
            <li role="presentation" class="pull-right"><a href="/login"><span class="glyphicon glyphicon-log-in"></span>
                管理者登录</a></li>
            {{end}}
        </ul>
    </div>
</div>
<div class="container" style="height: 50px"></div>